[Bug]: Error with profile with missing tenants

Repo: · Issue: #336 Status: Open · Priority: P2 Assignee: Raymond Labels: bug

Description

Steps to reproduce

No clear steps how to reproduce. It happened during log in.

  1. Go to staging (GH pages frontend) and try to log in with the user listed below (error may not happen)

The error seems to happen somewhat at random but relatively often. It was noticed when trying to log n following account by @TwillPayments and @nadddder:

user: martin+demo@twillpayments.com

I checked the logs immediately after the error and I saw this error (that is supressed in alerts):

Here is a query to find the logs

Looks like some users have been left with no tenants assigned (screen shot from profile table on staging):

Image

But that does not seem to be the case for martin+demo@twillpayments. The error is resolved by restarting the facade instance.

Also incidentally these errors seem to go unnoticed by alerts

Expected behavior

I expected to sign in normally

Actual behavior

I see an error screen.

Image

Implementation Notes

Dash adds notes here while working

Link to people, meetings, dependent tickets